Optimal. Leaf size=50 \[ \frac {\left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{2 B (b c-a d) g i n} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.08, antiderivative size = 50, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 43, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.047, Rules used = {2561, 2338}
\begin {gather*} \frac {\left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )^2}{2 B g i n (b c-a d)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2338
Rule 2561
Rubi steps
\begin {align*} \int \frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{(139 c+139 d x) (a g+b g x)} \, dx &=\int \left (\frac {b \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{139 (b c-a d) g (a+b x)}-\frac {d \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{139 (b c-a d) g (c+d x)}\right ) \, dx\\ &=\frac {b \int \frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{a+b x} \, dx}{139 (b c-a d) g}-\frac {d \int \frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{c+d x} \, dx}{139 (b c-a d) g}\\ &=\frac {\log (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{139 (b c-a d) g}-\frac {\left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log (c+d x)}{139 (b c-a d) g}-\frac {(B n) \int \frac {(c+d x) \left (-\frac {d (a+b x)}{(c+d x)^2}+\frac {b}{c+d x}\right ) \log (a+b x)}{a+b x} \, dx}{139 (b c-a d) g}+\frac {(B n) \int \frac {(c+d x) \left (-\frac {d (a+b x)}{(c+d x)^2}+\frac {b}{c+d x}\right ) \log (c+d x)}{a+b x} \, dx}{139 (b c-a d) g}\\ &=\frac {\log (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{139 (b c-a d) g}-\frac {\left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log (c+d x)}{139 (b c-a d) g}-\frac {(B n) \int \left (\frac {b \log (a+b x)}{a+b x}-\frac {d \log (a+b x)}{c+d x}\right ) \, dx}{139 (b c-a d) g}+\frac {(B n) \int \left (\frac {b \log (c+d x)}{a+b x}-\frac {d \log (c+d x)}{c+d x}\right ) \, dx}{139 (b c-a d) g}\\ &=\frac {\log (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{139 (b c-a d) g}-\frac {\left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log (c+d x)}{139 (b c-a d) g}-\frac {(b B n) \int \frac {\log (a+b x)}{a+b x} \, dx}{139 (b c-a d) g}+\frac {(b B n) \int \frac {\log (c+d x)}{a+b x} \, dx}{139 (b c-a d) g}+\frac {(B d n) \int \frac {\log (a+b x)}{c+d x} \, dx}{139 (b c-a d) g}-\frac {(B d n) \int \frac {\log (c+d x)}{c+d x} \, dx}{139 (b c-a d) g}\\ &=\frac {\log (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{139 (b c-a d) g}+\frac {B n \log \left (-\frac {d (a+b x)}{b c-a d}\right ) \log (c+d x)}{139 (b c-a d) g}-\frac {\left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log (c+d x)}{139 (b c-a d) g}+\frac {B n \log (a+b x) \log \left (\frac {b (c+d x)}{b c-a d}\right )}{139 (b c-a d) g}-\frac {(B n) \text {Subst}\left (\int \frac {\log (x)}{x} \, dx,x,a+b x\right )}{139 (b c-a d) g}-\frac {(B n) \text {Subst}\left (\int \frac {\log (x)}{x} \, dx,x,c+d x\right )}{139 (b c-a d) g}-\frac {(b B n) \int \frac {\log \left (\frac {b (c+d x)}{b c-a d}\right )}{a+b x} \, dx}{139 (b c-a d) g}-\frac {(B d n) \int \frac {\log \left (\frac {d (a+b x)}{-b c+a d}\right )}{c+d x} \, dx}{139 (b c-a d) g}\\ &=-\frac {B n \log ^2(a+b x)}{278 (b c-a d) g}+\frac {\log (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{139 (b c-a d) g}+\frac {B n \log \left (-\frac {d (a+b x)}{b c-a d}\right ) \log (c+d x)}{139 (b c-a d) g}-\frac {\left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log (c+d x)}{139 (b c-a d) g}-\frac {B n \log ^2(c+d x)}{278 (b c-a d) g}+\frac {B n \log (a+b x) \log \left (\frac {b (c+d x)}{b c-a d}\right )}{139 (b c-a d) g}-\frac {(B n) \text {Subst}\left (\int \frac {\log \left (1+\frac {d x}{b c-a d}\right )}{x} \, dx,x,a+b x\right )}{139 (b c-a d) g}-\frac {(B n) \text {Subst}\left (\int \frac {\log \left (1+\frac {b x}{-b c+a d}\right )}{x} \, dx,x,c+d x\right )}{139 (b c-a d) g}\\ &=-\frac {B n \log ^2(a+b x)}{278 (b c-a d) g}+\frac {\log (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{139 (b c-a d) g}+\frac {B n \log \left (-\frac {d (a+b x)}{b c-a d}\right ) \log (c+d x)}{139 (b c-a d) g}-\frac {\left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log (c+d x)}{139 (b c-a d) g}-\frac {B n \log ^2(c+d x)}{278 (b c-a d) g}+\frac {B n \log (a+b x) \log \left (\frac {b (c+d x)}{b c-a d}\right )}{139 (b c-a d) g}+\frac {B n \text {Li}_2\left (-\frac {d (a+b x)}{b c-a d}\right )}{139 (b c-a d) g}+\frac {B n \text {Li}_2\left (\frac {b (c+d x)}{b c-a d}\right )}{139 (b c-a d) g}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains higher order function than in optimal. Order 4 vs. order 3 in
optimal.
time = 0.08, size = 219, normalized size = 4.38 \begin {gather*} \frac {2 A \log (a+b x)-B n \log ^2(a+b x)+2 B \log (a+b x) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )-2 A \log (c+d x)+2 B n \log \left (\frac {d (a+b x)}{-b c+a d}\right ) \log (c+d x)-2 B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right ) \log (c+d x)-B n \log ^2(c+d x)+2 B n \log (a+b x) \log \left (\frac {b (c+d x)}{b c-a d}\right )+2 B n \text {Li}_2\left (\frac {d (a+b x)}{-b c+a d}\right )+2 B n \text {Li}_2\left (\frac {b (c+d x)}{b c-a d}\right )}{2 (b c-a d) g i} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.15, size = 0, normalized size = 0.00 \[\int \frac {A +B \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right )}{\left (b g x +a g \right ) \left (d i x +c i \right )}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Both result and optimal contain complex but leaf count of result is larger than
twice the leaf count of optimal. 172 vs. \(2 (46) = 92\).
time = 0.28, size = 172, normalized size = 3.44 \begin {gather*} -B {\left (\frac {\log \left (b x + a\right )}{{\left (-i \, b c + i \, a d\right )} g} - \frac {\log \left (d x + c\right )}{{\left (-i \, b c + i \, a d\right )} g}\right )} \log \left ({\left (\frac {b x}{d x + c} + \frac {a}{d x + c}\right )}^{n} e\right ) + \frac {{\left (i \, \log \left (b x + a\right )^{2} - 2 i \, \log \left (b x + a\right ) \log \left (d x + c\right ) + i \, \log \left (d x + c\right )^{2}\right )} B n}{2 \, {\left (b c g - a d g\right )}} - A {\left (\frac {\log \left (b x + a\right )}{{\left (-i \, b c + i \, a d\right )} g} - \frac {\log \left (d x + c\right )}{{\left (-i \, b c + i \, a d\right )} g}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.39, size = 59, normalized size = 1.18 \begin {gather*} -\frac {i \, B n \log \left (\frac {b x + a}{d x + c}\right )^{2} - 2 \, {\left (-i \, A - i \, B\right )} \log \left (\frac {b x + a}{d x + c}\right )}{2 \, {\left (b c - a d\right )} g} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {A}{a c + a d x + b c x + b d x^{2}}\, dx + \int \frac {B \log {\left (e \left (\frac {a}{c + d x} + \frac {b x}{c + d x}\right )^{n} \right )}}{a c + a d x + b c x + b d x^{2}}\, dx}{g i} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 2.58, size = 88, normalized size = 1.76 \begin {gather*} -\frac {{\left (i \, B n \log \left (\frac {b x + a}{d x + c}\right )^{2} + 2 i \, A \log \left (\frac {b x + a}{d x + c}\right ) + 2 i \, B \log \left (\frac {b x + a}{d x + c}\right )\right )} {\left (\frac {b c}{{\left (b c - a d\right )}^{2}} - \frac {a d}{{\left (b c - a d\right )}^{2}}\right )}}{2 \, g} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 5.72, size = 76, normalized size = 1.52 \begin {gather*} -\frac {B\,{\ln \left (e\,{\left (\frac {a+b\,x}{c+d\,x}\right )}^n\right )}^2-A\,n\,\mathrm {atan}\left (\frac {b\,c\,2{}\mathrm {i}+b\,d\,x\,2{}\mathrm {i}}{a\,d-b\,c}+1{}\mathrm {i}\right )\,4{}\mathrm {i}}{2\,g\,i\,n\,\left (a\,d-b\,c\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________